<template>
<view class="container padding sec-top">
	<view class="profile-banner detail-white">
		<view class="task-list">
			<view class="task-item border"
				@click="onTaskItem('autoplay')">
				<view class="task-item-content">
					<text>运营商网络自动播放</text>
				</view>
				<switch color="#EEEEEE"
					style="transform:scale(.7)"
					:checked="checked" />
			</view>
			<view class="task-item border"
				@click="onTaskItem('download')">
				<view class="task-item-content">
					<text>允许运营商网络下载/上传</text>
				</view>
				<switch color="#EEEEEE"
					style="transform:scale(.7)"
					:checked="checked" />
			</view>
			<view class="task-item"
				@click="onTaskItem('space')">
				<view class="task-item-content">
					<text>剩余空间不足时提醒清理离线视频</text>
				</view>
				<switch color="#EEEEEE"
					style="transform:scale(.7)"
					:checked="checked" />
			</view>
		</view>
	</view>
</view>
</template>

<script>
export default {
	data() {
		return {
			checked: false
		}
	},
	onShow() {
		const token = uni.getStorageSync('X-Auth-Token');
		if (!token) {
			uni.navigateTo({
				url: '/pages/login/login'
			});
		}
	},
	methods: {
		onTaskItem(type) {
			switch(type) {
				case 'autoplay':
					break;
				case 'download':
					break;
				case 'space':
					break;
				default:
					break;
			}
		}
	}
}
</script>
